<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
	</head>
	<body>
		<h1>标题</h1>
		<p id="p01">
			段落内容<br />
			<span>内容1</span>
			<span>内容2</span>
		</p>
		<script>
			window.onload=function()
			{
				console.log("节点的名字："+document.body.nodeName)
				console.log("节点的类型："+document.body.nodeType)
				console.log("节点的值："+document.body.nodeValue)
				console.log("子节点："+document.body.childNodes)
				console.log("子节点："+document.body.childNodes.length);
				console.log("p01节点名字"+p01.nodeName);
				console.log("p01节点类型"+p01.nodeType);
				console.log("p01节点值"+p01.nodeValue);
				console.log("p01子元素的数量"+p01.childNodes.length);
			}
		</script>
	</body>
</html>
